package com.zjjk.transfer.app;

import com.zjjk.transfer.source.entity.SourceUser;
import com.zjjk.transfer.source.service.SourceUserService;
import com.zjjk.transfer.target.entity.TargetCustomer;
import com.zjjk.transfer.target.service.TargetCustomerService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;

@Component
public class CustomerTransfer extends BaseTransfer<SourceUser,TargetCustomer,SourceUserService,TargetCustomerService>{
    
    @Override
    protected TargetCustomer convert(SourceUser source) {
        TargetCustomer target = new TargetCustomer();
        BeanUtils.copyProperties(source, target);
        target.setId(Long.valueOf(source.getId()));
        target.setOpenId(source.getOpenId());
        target.setDeleted(0);
        return target;
    }
}
